
<%@page import="study.top.mydb.Nboard"%>
<%@page import="study.top.mydb.Board"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page trimDirectiveWhitespaces="true" %>
<%@ include file="dbcon.jsp"%>

<%
db.connect();
	int seq = web.getInt("seq");

	
	if (seq < 0) {
		db.disconnect();
		web.goPage(null, "파라미터가 없습니다.");
		return;
	}
	
	Nboard nboard = new Nboard();
	boolean result = nboard.deleteNboard(seq);
	db.disconnect();
	
	if (!result) {
		web.goPage(null, "시스템 상의 이유로 삭제되지 않았습니다.");
		return;
	}
	
	web.goPage("nBoardList.jsp", "삭제되었습니다.");
%>
